Pollard's kangaroo algorithm